package com.byfan.springboottemplate.service;

import com.byfan.springboottemplate.exception.SpringBootTemplateException;
import com.byfan.springboottemplate.model.FileEntity;
import com.byfan.springboottemplate.model.UserEntity;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * @ClassName: IFileService
 * @Description:
 * @Author: byfan
 * @Date: 2023/7/28
 */
public interface IFileService {

    List<FileEntity> getAll() throws SpringBootTemplateException;

    FileEntity upload(MultipartFile multipartFile) throws SpringBootTemplateException;

    void delete(Long id) throws SpringBootTemplateException;

    void delete(String path) throws SpringBootTemplateException;

    void download(String path) throws SpringBootTemplateException;

    void download(Long id, HttpServletResponse response) throws SpringBootTemplateException;

}
